using System;
using System.Data;
using System.Collections.Generic;
using ADOBase;
namespace eTMS.DAO{
	/********************************BEGIN PhongHocDAO****************************************/
	///<summary>
	/// <para>Author: Auto generated class by CSharp Code Generator v2.0</para>
	/// <para>Date:26/10/2011 34:05:09</para>
	/// <para>Class Name: PhongHocDAO</para>
	/// <para>Description: Class access to table PhongHoc in database. Coder should'nt code here.</para>
	///</summary>

	
	public partial class PhongHocDAO : DAOBase<PhongHocEntity>{


		#region Select functions
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: CreateSelectOneCommand</para>
		/// <para>Input: PhongHoc_ID</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateSelectOneCommand(int PhongHoc_ID){
			string strSQL="SELECT  [PhongHoc_ID],[MaPhong],[SucChua],[Tang],[ThuTu],[KhuNha_ID] FROM [PhongHoc]  WHERE [PhongHoc].[PhongHoc_ID]=@PhongHoc_ID";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			this.CreateCommandParameter(cmd,"@PhongHoc_ID",PhongHoc_ID);



			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: SelectOne</para>
		/// <para>Input: PhongHoc_ID</para>
		/// <para>Output: PhongHocEntity</para>
		///</summary>
		public PhongHocEntity SelectOne(int PhongHoc_ID){
			IDbCommand cmd=this.CreateSelectOneCommand(PhongHoc_ID);
			return this.Select(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: SelectOneByMaPhong</para>
		/// <para>Input: MaPhong</para>
		/// <para>Output: PhongHocEntity</para>
		///</summary>
		public PhongHocEntity SelectOneByMaPhong(string MaPhong){
			IDbCommand cmd=this.CreateSelectAllByKeyCommand("MaPhong",MaPhong);
			return this.Select(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: CreateSelectAllCommand</para>
		/// <para>Input: </para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateSelectAllCommand(){
			string strSQL="SELECT  [PhongHoc_ID],[MaPhong],[SucChua],[Tang],[ThuTu],[KhuNha_ID] FROM [PhongHoc] ";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: CreateSelectAllByKeyCommand</para>
		/// <para>Input: ColumnName,ColumnValue</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateSelectAllByKeyCommand(string ColumnName,object Value){
			string strSQL="SELECT  [PhongHoc_ID],[MaPhong],[SucChua],[Tang],[ThuTu],[KhuNha_ID] FROM [PhongHoc]  WHERE [PhongHoc].["+ColumnName+"]=@ColumnName";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			this.CreateCommandParameter(cmd,"@ColumnName",Value);



			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: SelectAll</para>
		/// <para>Input: </para>
		/// <para>Output: List of PhongHocEntity</para>
		///</summary>
		public List<PhongHocEntity> SelectAll(){
			IDbCommand cmd=this.CreateSelectAllCommand();
			return this.SelectList(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: SelectAllDS</para>
		/// <para>Input: </para>
		/// <para>Output: DataSet</para>
		///</summary>
		public DataSet SelectAllDS(){
			IDbCommand cmd=this.CreateSelectAllCommand();
			return this.SelectDS(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: CreateSelectAllFilterCommand</para>
		/// <para>Input: </para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateSelectAllFilterCommand(string strFilter){
			string strSQL="SELECT  [PhongHoc_ID],[MaPhong],[SucChua],[Tang],[ThuTu],[KhuNha_ID] FROM [PhongHoc]  WHERE "+RemoveInjection(strFilter);
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: CreateSelectAllByKeyFilterCommand</para>
		/// <para>Input: ColumnName,ColumnValue</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateSelectAllByKeyFilterCommand(string strFilter,string ColumnName,object Value){
			string strSQL="SELECT  [PhongHoc_ID],[MaPhong],[SucChua],[Tang],[ThuTu],[KhuNha_ID] FROM [PhongHoc]  WHERE [PhongHoc].["+ColumnName+"]=@ColumnName AND "+RemoveInjection(strFilter);
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			this.CreateCommandParameter(cmd,"@ColumnName",Value);



			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: SelectAll</para>
		/// <para>Input: </para>
		/// <para>Output: List of PhongHocEntity</para>
		///</summary>
		public List<PhongHocEntity> SelectAllFilter(string strFilter){
			IDbCommand cmd=this.CreateSelectAllFilterCommand(strFilter);
			return this.SelectList(cmd);
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: SelectAllDSFilter</para>
		/// <para>Input: </para>
		/// <para>Output: DataSet</para>
		///</summary>
		public DataSet SelectAllDSFilter(string strFilter){
			IDbCommand cmd=this.CreateSelectAllFilterCommand(strFilter);
			return this.SelectDS(cmd);
		}
		#endregion

		#region Insert functions
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: CreateInsertCommand</para>
		/// <para>Input: PhongHocEntity</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateInsertCommand(PhongHocEntity o){
			string strSQL="INSERT INTO [PhongHoc]([MaPhong],[SucChua],[Tang],[ThuTu],[KhuNha_ID]) VALUES  (@MaPhong,@SucChua,@Tang,@ThuTu,@KhuNha_ID);SELECT  @@IDENTITY";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			if(o.IsNullMaPhong)
				this.CreateCommandParameter(cmd,"@MaPhong",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@MaPhong",o.MaPhong);

			if(o.IsNullSucChua)
				this.CreateCommandParameter(cmd,"@SucChua",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@SucChua",o.SucChua);

			if(o.IsNullTang)
				this.CreateCommandParameter(cmd,"@Tang",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@Tang",o.Tang);

			if(o.IsNullThuTu)
				this.CreateCommandParameter(cmd,"@ThuTu",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@ThuTu",o.ThuTu);

			if(o.IsNullKhuNha_ID)
				this.CreateCommandParameter(cmd,"@KhuNha_ID",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@KhuNha_ID",o.KhuNha_ID);


			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: Save</para>
		/// <para>Input: PhongHocEntity</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool Save(PhongHocEntity o){
			bool result=false;
			IDbCommand cmd=this.CreateInsertCommand(o);
			object id=this.ExecuteScalar(cmd,ref result);
			cmd.Dispose();
			try{
				o.PhongHoc_ID=int.Parse(Convert.ToString(id));
			}
			catch{}
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: SaveList</para>
		/// <para>Input: List of PhongHocEntity</para>
		/// <para>Output: </para>
		///</summary>
		public void SaveList(List<PhongHocEntity>list){
			foreach(PhongHocEntity o in list){
				try{
					this.Save(o);
				}
				catch{
				}
			}
		}
		#endregion

		#region Update functions
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: CreateUpdateCommand</para>
		/// <para>Input: PhongHocEntity</para>
		/// <para>Output: </para>
		///</summary>
		protected IDbCommand CreateUpdateCommand(PhongHocEntity o){
			string strSQL="UPDATE  [PhongHoc] SET [PhongHoc].[MaPhong]=@MaPhong,[PhongHoc].[SucChua]=@SucChua,[PhongHoc].[Tang]=@Tang,[PhongHoc].[ThuTu]=@ThuTu,[PhongHoc].[KhuNha_ID]=@KhuNha_ID WHERE [PhongHoc].[PhongHoc_ID]=@PhongHoc_ID";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			if(o.IsNullPhongHoc_ID)
				this.CreateCommandParameter(cmd,"@PhongHoc_ID",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@PhongHoc_ID",o.PhongHoc_ID);

			if(o.IsNullMaPhong)
				this.CreateCommandParameter(cmd,"@MaPhong",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@MaPhong",o.MaPhong);

			if(o.IsNullSucChua)
				this.CreateCommandParameter(cmd,"@SucChua",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@SucChua",o.SucChua);

			if(o.IsNullTang)
				this.CreateCommandParameter(cmd,"@Tang",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@Tang",o.Tang);

			if(o.IsNullThuTu)
				this.CreateCommandParameter(cmd,"@ThuTu",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@ThuTu",o.ThuTu);

			if(o.IsNullKhuNha_ID)
				this.CreateCommandParameter(cmd,"@KhuNha_ID",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@KhuNha_ID",o.KhuNha_ID);


			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: CreateUpdateFieldCommand</para>
		/// <para>Input: ColumnName,ColumnValue,PhongHoc_ID</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateUpdateFieldCommand(string ColumnName,object Value,int PhongHoc_ID){
			string strSQL="UPDATE  [PhongHoc] SET [PhongHoc].["+ColumnName+"]=@ColumnName WHERE [PhongHoc].[PhongHoc_ID]=@PhongHoc_ID";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			this.CreateCommandParameter(cmd,"@PhongHoc_ID",PhongHoc_ID);



			this.CreateCommandParameter(cmd,"@ColumnName",Value);


			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: Update</para>
		/// <para>Input: PhongHocEntity</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool Update(PhongHocEntity o){
			IDbCommand cmd=this.CreateUpdateCommand(o);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateList</para>
		/// <para>Input: List of PhongHocEntity</para>
		/// <para>Output: </para>
		///</summary>
		public void UpdateList(List<PhongHocEntity>list){
			foreach(PhongHocEntity o in list){
				try{
					this.Update(o);
				}
				catch{
				}
			}
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateMaPhong</para>
		/// <para>Input: NewMaPhong,PhongHoc_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateMaPhong(string NewMaPhong,int PhongHoc_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("MaPhong",NewMaPhong,PhongHoc_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateSucChua</para>
		/// <para>Input: NewSucChua,PhongHoc_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateSucChua(int NewSucChua,int PhongHoc_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("SucChua",NewSucChua,PhongHoc_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateTang</para>
		/// <para>Input: NewTang,PhongHoc_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateTang(int NewTang,int PhongHoc_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("Tang",NewTang,PhongHoc_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateThuTu</para>
		/// <para>Input: NewThuTu,PhongHoc_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateThuTu(int NewThuTu,int PhongHoc_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("ThuTu",NewThuTu,PhongHoc_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: UpdateKhuNha_ID</para>
		/// <para>Input: NewKhuNha_ID,PhongHoc_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool UpdateKhuNha_ID(int NewKhuNha_ID,int PhongHoc_ID){
			IDbCommand cmd=this.CreateUpdateFieldCommand("KhuNha_ID",NewKhuNha_ID,PhongHoc_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		#endregion

		#region Delete functions
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: DeleteAllCommand</para>
		/// <para>Input: </para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateDeleteAllCommand(){
			string strSQL="DELETE   FROM [PhongHoc]  ";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: DeleteCommand</para>
		/// <para>Input: PhongHocEntity</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateDeleteCommand(PhongHocEntity o){
			string strSQL="DELETE   FROM [PhongHoc]   WHERE [PhongHoc].[PhongHoc_ID]=@PhongHoc_ID";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			if(o.IsNullPhongHoc_ID)
				this.CreateCommandParameter(cmd,"@PhongHoc_ID",System.DBNull.Value);
			else
				this.CreateCommandParameter(cmd,"@PhongHoc_ID",o.PhongHoc_ID);


			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: DeleteAll</para>
		/// <para>Input: </para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool DeleteAll(){
			IDbCommand cmd=this.CreateDeleteAllCommand();
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: CreateDeleteByPrimaryKeyCommand</para>
		/// <para>Input: PhongHoc_ID</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateDeleteByPrimaryKeyCommand(int PhongHoc_ID){
			string strSQL="DELETE   FROM [PhongHoc]   WHERE [PhongHoc].[PhongHoc_ID]=@PhongHoc_ID";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			this.CreateCommandParameter(cmd,"@PhongHoc_ID",PhongHoc_ID);



			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: CreateDeleteByKeyCommand</para>
		/// <para>Input: ColumnName , ColumnValue</para>
		/// <para>Output: IDbCommand</para>
		///</summary>
		protected IDbCommand CreateDeleteByKeyCommand(string ColumnName,object Value){
			string strSQL="DELETE   FROM [PhongHoc]   WHERE [PhongHoc].["+ColumnName+"]=@ColumnName";
			IDbCommand cmd=this.CreateCommand(strSQL);
			cmd.CommandType=CommandType.Text;
			this.CreateCommandParameter(cmd,"@ColumnName",Value);



			return cmd;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: Delete</para>
		/// <para>Input: PhongHocEntity</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool Delete(PhongHocEntity o){
			IDbCommand cmd=this.CreateDeleteCommand(o);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: DeleteByID</para>
		/// <para>Input: PhongHoc_ID</para>
		/// <para>Output: return true if succeeded else return false</para>
		///</summary>
		public bool DeleteByID(int PhongHoc_ID){
			IDbCommand cmd=this.CreateDeleteByPrimaryKeyCommand(PhongHoc_ID);
			bool result=this.ExcuteNoneQuery(cmd);
			cmd.Dispose();
			return result;
		}
		#endregion

		#region Select join to KhuNha functions
		#endregion

		#region Select,delete by PhongHoc_ID functions
		#endregion

		#region Select,delete by KhuNha_ID functions
		#endregion

		#region MapObject functions
		///<summary>
		/// <para>Author: Auto generated by CSharp Code Generator v2.0</para>
		/// <para>Date:26/10/2011 34:05:09</para>
		/// <para>Name: MapObject</para>
		/// <para>Input: IDataReader</para>
		/// <para>Output: PhongHocEntity</para>
		///</summary>
		protected override PhongHocEntity MapObject(IDataReader r){
			PhongHocEntity entity = new PhongHocEntity();
			try{
				if(r.FieldCount>0){
					try
					{
						int ordinal = r.GetOrdinal("PhongHoc_ID");
						if (!r.IsDBNull(ordinal)) entity.PhongHoc_ID = ((int)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("MaPhong");
						if (!r.IsDBNull(ordinal)) entity.MaPhong = ((string)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("SucChua");
						if (!r.IsDBNull(ordinal)) entity.SucChua = ((int)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("Tang");
						if (!r.IsDBNull(ordinal)) entity.Tang = ((int)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("ThuTu");
						if (!r.IsDBNull(ordinal)) entity.ThuTu = ((int)(r.GetValue(ordinal)));
					}
					catch{}
					try
					{
						int ordinal = r.GetOrdinal("KhuNha_ID");
						if (!r.IsDBNull(ordinal)) entity.KhuNha_ID = ((int)(r.GetValue(ordinal)));
					}
					catch{}
					return entity;
				}
			}catch{}
			return null;
		}
		#endregion
	}
	/*****************************************************************************************************/
	/**********************************END PhongHocDAOBase*****************************************/
	/*****************************************************************************************************/
}

